<%@ page import="top.liuzhenyu.study.javawebjdbc.dao.NewsDAO" %><%--
  Created by IntelliJ IDEA.
  User: liuzhenyu
  Date: 2024/5/23
  Time: 12:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>删除新闻</title>
</head>
<body>

    <%
        request.setCharacterEncoding("utf-8");
        String sid = request.getParameter("id");
        Integer id = Integer.parseInt(sid);
        int result = NewsDAO.delete(id);
    %>

要删除的新闻为：<%=sid%>

    <script>
        alert("删除成功")
        location.href = 'newlist.jsp';
    </script>

</body>
</html>
